package com.hz.house.enums;

/**
 *  物业类型查询条件
 * @author lfw
 *
 */
public enum SearchPropTypeConditionEnum {
	
	HOUSE(1,"住宅","residence",-1),
	VILLA(2,"别墅","villa",10),
	APARTMENT(4,"商办公寓","apartment",11),
	MARKET(3,"商铺","shopBusiness",29),
	OFFICE(5,"写字楼","officeBuilding",30),
	YANGFANG(6,"洋房","yangfang",28),
	SHANGSHU(7,"商墅","shangshu",32);
 
	private int id;
	
	private String name;
	
	private String type;
	
	private int tagId;
	
	
	SearchPropTypeConditionEnum(int id,String name,String type,int tagId){
		this.id=id;
		this.name=name;
		this.type=type;
		this.tagId=tagId;
		
	}

	/**
	 *  根据id获取物业类型的条件
	 * @param id
	 * @return
	 */
	public static SearchPropTypeConditionEnum getSearchPropTypeById(int id) {
		SearchPropTypeConditionEnum[] all = SearchPropTypeConditionEnum.values();
		for(SearchPropTypeConditionEnum s:all) {
			if(s.getId()==id)
				return s;
		}
		return null;
	}
	

	public int getId() {
		return id;
	}


	public String getName() {
		return name;
	}


	public String getType() {
		return type;
	}

	public int getTagId() {
		return tagId;
	}
	
	
}
